#!/bin/bash
[ -f /etc/init.d/functions ] && . /etc/init.d/functions
for user in oldboy{01..10}
do
	id $user &> /dev/null
	if [ $? -ne 0 ];then
       useradd $user
       password=`mkpasswd -l 8`
       echo "$password"|passwd --stdin $user
       echo "$user $password" >>/tmp/password.txt
       action "$user 创建" /bin/true
else
	   action "$user 创建" /bin/false 
    fi
done
